<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>条件渲染</title>


</head>
<body>
    <div id="div">
        <!--判断num的值，对3取余 余数为0显示div1 余数为1显示div2 余数为2显示div3-->
        <div v-if="num % 3 == 0">div1</div>
        <div v-else-if="num % 3 == 1">div2</div>
        <div v-else="num % 3 == 2">div3</div>

        <div v-show="flag">div4</div><!---->

    </div>
<script src="js/vue.js"></script>
<script>
    new Vue({
       el:"#div",
       data:{
           num:3,
           flag:false/**/
       }
    });
</script>
</body>
</html>